home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 May
/
1984-05.d64
/
ski physics_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
108 lines
5 print"[147]"
15 poke52,48:poke56,48:clr:k=12288:pc=56334:cp=53272
16 pokepc,peek(pc)and254:poke1,peek(1)and251
20 forj=0to512:pokek+j,peek(53248+j):nextj
25 fori=216to255:reada%:pokek+i,a%:nexti:fori=280to327:readb%:pokek+i,b%:nexti
26 poke1,peek(1)or4:pokepc,peek(pc)or1
30 print"[147]":pokecp,21:bc=53280:bk=53281:pokebc,5:pokebk,1
35 print"[144]ski physics"
50 v=54272:forl=vtov+24:pokel,0:next
52 pokev+5,88:pokev+4,33:pokev+24,143:pokev+6,195
55 readlf,hf,dr:iflf=-1then65
60 pokev,lf:pokev+1,hf:fort=1todr:nextt:goto55
65 pokev,0:pokev+1,0:pokev+24,0:d=1
75 printspc(131)"[144]press the f1 key"
80 geta$:ifa$=""then80
85 ifa$=chr$(133)thenondgoto100,140,185,225,250
90 goto80
100 print"[147]":pokebc,6:pokebk,1:print:printspc(104)"[144][175][175]"
105 printspc(13)"[144][208][207][167][165][170][205] [206][180][170][175][175]":printspc(13)"[144][170][180][167][165][170] [205][206] [180][170][175][175]"
110 printspc(92)"time is duration"
111 printspc(93)"[144]it is measured"
112 printspc(55)"in minutes":printspc(15)"and hours":d=2:goto75
140 print"[147]":pokebc,4:pokebk,1:printspc(130)"[144] [205] [175]"
145 printspc(10)"[144] [205] [206][204] [180][170][183][180] [207][170] [208][207][205][206]"
150 printspc(10)"[144] [205][206] [204] [204][170][175][180] [204][170] [167][165][167][165]"
155 printspc(92)"velocity is speed":printspc(93)"[144]it is measured"
160 printspc(13)"in feet/second":printspc(13)"or miles/hour":d=3:goto75
185 print"[147]":pokebc,7:pokebk,1
189 printspc(129)" [175] [175] [175]"
190 printspc(9)" [180][205][167][165][204] [208][207][206][205][170][205][180][207] [204]"
195 printspc(9)" [180][206][167][165][186] [167][165][207][208][170] [180][204] [204]"
196 printspc(9)" [163]"
200 printspc(91)"distance is length":printspc(92)"[144]it is measured"
205 printspc(52)"in feet or miles": d=4:goto75
225 print"[147]":pokebc,13:pokebk,1:printspc(132)"*instructions*"
226 print:print:printtab(11)"you will be given"
230 printspc(11)"problems to solve":printspc(11)"with time,distance"
231 printspc(11)"and velocity."
235 printspc(11)"answer with the":printspc(11)"correct number."
236 printspc(11)"ignore remainders."
237 printspc(11)"do not give units.":d=5:goto75
250 print"[147]":pokebc,10:pokebk,1:pokecp,(peek(cp)and240)+12
255 a=int(rnd(0)*3+1):b=int(rnd(0)*7+1):x=int(rnd(0)*21+5):y=int(rnd(0)*101+50)
260 ifa=1thend$="feet":tt$="seconds":v$="f/s"
265 ifa=2thend$="miles":tt$="hours":v$="mph"
270 ifa=3thend$="feet":tt$="minutes":v$="f/m"
280 onbgosub440,470,440,455,470,440,470
285 print:print:print:printtab(29)"[144][\":printtab(29)"]("
290 forn=29to25step-1:printtab(n)"(":nextn
295 printtab(22)"'''''":printtab(22)"'''''"
300 printtab(5)"[156]''''''''''[158] %%%%%''''''''''"
301 printtab(3)"[156]'''''''''''''''''''''''''''''''''"
305 print"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"
310 z=1024+(9*40)+30:v=54272:c=z+v
315 input"[144] ";s$:s=val(s$):ifs=kthen360
330 pokev+24,143:print" uh uh! sorry "
335 form=60to20step-5:pokev,int(m/3):pokev+1,m:fort=1to15:nextt:nextm
340 q=5:gosub480:pokev+1,0:pokev,0:forn=1to4:pokez,32:pokez+39,32
341 pokez+40,32:pokez+41,32
345 pokez+40,30:pokec+40,0:pokez+79,35:pokec+79,0:pokez+80,31:pokec+80,0
350 pokez+81,36:pokec+81,0:z=z+40:c=c+40:nextn
354 forn=0to4:pokez+38+n,38:pokec+38+n,7:nextn:pokev,195:pokev+1,16
355 forl=15to5step-1:pokev+24,l:fort=1to50:nextt:nextl:pp=1:pokev,0:pokev+1,0
356 goto400
360 print" yep! thats right ":form=0to60step2:pokev,m/2
361 pokev+1,int(m/2):nextm:pokev,0:pokev+1,0
362 q=10:gosub480:forn=1to3:pokez,32:pokez+39,32
363 pokez+40,32:pokez+41,32
364 pokez+39,30:pokec+39,0:pokez+78,35:pokec+78,0:pokez+79,31:pokec+79,0
366 pokez+80,36:pokec+80,0:z=z+39:c=c+39:nextn
367 pokev+24,143
368 form=12to60step4:pokev,m/2:pokev+1,m:fort=1to25:nextt:nextm:pokev,0
369 pokev+1,0:pp=2
400 print"[147]":pokebc,14:pokebk,1
404 ifpp=2then410
405 print:print:printspc(171)"you lost this time"
406 printspc(90)"better luck next time"
407 goto415
410 print:print:printspc(206)"you solved the given problem"
415 d=5:goto75
440 k=int(y/x)
441 printspc(42)"[144]a skier went ";y:print" ";d$
442 print"[144] in ";x;"";tt$
445 print"[144] what was his":print"[144] velocity in ";v$:return
455 k=x*y:printspc(42)"[144]a skier went ";x
456 print" ";v$:print"[144] for ";y"";tt$
460 print"[144] what was his":print"[144] distance in ";"";d$:return
470 k=int(y/x)
471 printspc(42)"[144]a skier went ";y:print" ";d$
472 print"[144] at ";x;"";v$
475 print"[144] how much time did":print"[144] he ski in ";tt$:return
480 forn=1to5:pokez,32:pokez+1,32:pokez+40,32:pokez+39,27:pokec+39,0
482 pokez+40,28:pokec+40,0:pokez+79,29:pokec+79,0:z=z+39:c=c+39:nextn
484 pokev+24,0:z=z-39:pokez,32:pokez+1,32:pokez+40,32
486 z=1024+(14*40)+24:c=z+v:pokez+1,32
488 forn=1toq:pokez,32:pokez+39,32:pokez+40,32:pokez+41,32
490 pokez-1,30:pokec-1,0:pokez+38,35:pokec+38,0:pokez+39,31:pokec+39,0
492 pokez+40,36:pokec+40,0:z=z-1:c=c-1:nextn:return
500 data96,96,60,31,44,72,142,3,0,0,0,128,16,32,64,128,1,2,4,12,0,0,0,0,0,0,0
505 data24,24,8,30,45,76,152,16,16,24,8,56,255,0,0,0,0,0,0
506 data16,15,128,64,32,0,0,0,0,240
510 data56,56,124,126,255,255,255,255,74,32,136,2
512 data212,21,162,205,255,255,255,255
515 data255,255,255,255,1,2,4,8,16,32,64,128
520 data31,21,175,195,16,125,31,21,275,195,16,125,239,19,150,195,16,100
525 data239,19,150,195,16,100,239,19,125,209,18,300,31,21,175,195,16,125
530 data31,21,170,96,22,200,31,21,230,209,18,115,195,16,400,-1,-1,-1